package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DigitalCollectionProductInfoSubscribeWinBallot;
import com.sc.nft.entity.vo.DigitalCollectionProductInfoDrawVo;
import com.sc.nft.entity.vo.DigitalCollectionProductInfoSubscribeCodeSummaryVO;
import com.sc.nft.entity.vo.MySubscribeCodesWinDataVo;
import com.sc.nft.entity.vo.WinningUsersVO;
import com.sc.nft.vo.WinNoticePeopleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户申购中签表(DigitalCollectionProductInfoSubscribeWinBallot)表数据库访问层
 *
 * @author 王伟成
 * @since 2024-05-15 18:09:08
 */
public interface DigitalCollectionProductInfoSubscribeWinBallotMapper extends BaseMapper<DigitalCollectionProductInfoSubscribeWinBallot> {

    /**
     * 中签用户列表分页
     * @param mp
     * @param productId
     * @param userTel
     * @param status
     * @return
     */
    Page<WinningUsersVO> getSubscribeCodeUserPage(Page mp, @Param("productId") Long productId,@Param("userTel")String userTel,@Param("status")Boolean status);

    /**
     * 获取申购列表汇总数据
     * @param productId
     * @return
     */
    DigitalCollectionProductInfoSubscribeCodeSummaryVO getSubscribeCodeSummary(@Param("productId") Long productId);

    /**
     * 获取需要发短信的中签用户
     * @param productId
     * @return
     */
    List<WinNoticePeopleVo> getByUserTelAndStatus(@Param("productId")Long productId);

    /**
     * 同步更新发送完短信字段notice_status
     * @param id
     */
    void updateStatusById(@Param("id") Long id);
    /**
     * 结果公示中签名单
     * @param page
     * @param productId
     * @return
     */
    Page<MySubscribeCodesWinDataVo> getSubscribeWin(Page page, @Param("productId") Long productId);

    /**
     * 获取需要发送短信的申购活动
     * @return
     */
    List<DigitalCollectionProductInfoDrawVo> getResultAnnounce();
}
